
// Get the path of the currently running do-file
local do_file_path `c(pwd)'

// Change the working directory to the location of the do-file
cd "`do_file_path'"

** onshore PETRO shp data
import dbase using "local\gis_data\016_society\oil\PETRO_Offshore_080907_lake_chad_x_fishnet.dbf", clear
drop if FID_fishn==-1
rename OBJECTID objectid
keep objectid
g d_oilprod = 1

label variable d_oilprod "Dummy oil production : PETRO 2008"
sort objectid

save "proc_data\OILPROD.dta", replace

**
** add oil refineries in NER, CMR, TCD
**


** onshore PETRO shp data
import dbase using "local\gis_data\016_society\oil\oil_refinery_x_fishnet.dbf", clear
rename OBJECTID objectid
keep objectid
g d_oilref = 1

g oilref_name = ""
* tchad
replace oilref_name = "djermaya" if inlist(objectid, 13890, 13891, 13683, 13684)

* ner zinder
replace oilref_name = "soraz" if inlist(objectid, 16986, 16987, 16758, 16759)

* cmr douala
replace oilref_name = "limba" if inlist(objectid, 1186, 1187, 1188, 1125)


label variable d_oilref "Oil refinery area's ntl : various sources"
sort objectid

save "proc_data\OILREF.dta", replace

**
**
import dbase using "local\gis_data\005_economy\mining\ner_uranium_x_fishnet.dbf", clear
*replace d_uranium = 1 if inlist(objectid, 27320, 27321, 27322, 27121, 27122, 27123, 26922, 26923, 26924)
rename OBJECTID objectid
keep objectid
g d_uranium = 1
label variable d_uranium "Uranium mine - Arlit Niger"
sort objectid
save "proc_data\URANMINE.dta", replace
